package logicaDeNegocio;

import java.sql.Date;
import java.sql.SQLException;

import entidades.*;
import entidades.DAOs.DAOauditorias;

/**
 * @author sg
 * @version 1.0
 * @created 13-nov-2013 06:33:14 p.m.
 */
public class GestiondeAuditorias {

	public GestiondeAuditorias(){

	}

	public void finalize() throws Throwable {

	}

	public static void generarAuditoria(int id_usuario, String accion)
 {
		try{
		Auditoria aud= new Auditoria(id_usuario,accion);
		DAOauditorias.guardar(aud);
		}
		catch (SQLException a){
			a.printStackTrace();
			return;
		}
		catch(ClassNotFoundException b){
			b.printStackTrace();
			return;
		}
	}
	
	public static void genAuditoria(Usuario user, Accion accion)throws SQLException, ClassNotFoundException {
		Auditoria aud= new Auditoria(user,accion);
		DAOauditorias.guardar(aud);
	}
}//end Gestor de Auditorias